home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000073_Martyn.Johnson@cl.cam.ac.uk_Fri Oct 22 17:54:35 1993.msg < prev    next >
Internet Message Format  |  1994-10-11  |  2KB

  1. Received: from swan.cl.cam.ac.uk by cs.umb.edu with SMTP id AA22534
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Fri, 22 Oct 1993 15:41:39 -0400
  3. Received: from ashby.cl.cam.ac.uk (user maj (rfc931)) by swan.cl.cam.ac.uk 
  4.           with SMTP (PP-6.5) to cl; Fri, 22 Oct 1993 16:54:42 +0100
  5. To: tex-k@cs.umb.edu
  6. Cc: Martyn.Johnson@cl.cam.ac.uk
  7. Subject: kpathsea font fallback
  8. Date: Fri, 22 Oct 93 16:54:35 +0100
  9. From: Martyn Johnson <Martyn.Johnson@cl.cam.ac.uk>
  10. Message-Id: <"swan.cl.cam.:279160:931022155446"@cl.cam.ac.uk>
  11.  
  12. When kpathsea has failed to find or create a font at a suitable size,
  13. it tries the "fallback sizes", and chooses the first of these that it
  14. finds.  This will typically be the smallest. Often there will be a much
  15. better choice available.  In this respect, xdvik seems to do a worse
  16. job of finding the most suitable font than older versions of xdvi. I
  17. think other people have observed this, though no explanation was
  18. offered.
  19.  
  20. I think it should go to greater lengths to choose the best of the
  21. available sizes.  "Best" means approximately "nearest", though it
  22. is probably better (for readability) to pick a font 30% too small than
  23. 20% too big.
  24.  
  25. The same should apply if you have to go so far as using the fallback
  26. font - it should find the best size it can if the correct size is not
  27. immediately available.
  28.  
  29.  
  30. The other observation I've made is that overriding the fallback
  31. resolutions using an environment variable simply does not work.
  32.  
  33. The culprit is the following in kpathsea/lib.h:
  34.  
  35. /* If the environment variable TEST is set, return its value; otherwise,
  36.    DEFAULT.  This is useful for paths that use more than one envvar.  */
  37. #define ENVVAR(test, default) (getenv (test) ? (test) : (default))
  38.  
  39. The comment says that the environment variable value is returned;
  40. the code does nothing of the sort - it returns the NAME.  ENVVAR
  41. does not seem to be used for anything else, which probably explains
  42. why it has not been noticed before.
  43.  
  44. Martyn Johnson      maj@cl.cam.ac.uk
  45. University of Cambridge Computer Lab
  46. Cambridge UK